package com.andy.module.uploadphoto

/**
 * @creator:LuoFan
 * @date:2022/6/10
 * @description:
 */
class UploadPhotoBean {

    var index = 0
    var title = ""
    var localPath = ""
    var photoUrl = ""
    var status = STATUS_NONE
    var uploadPercent: Double = 0.0

    companion object {

        const val STATUS_NONE = 0
        const val STATUS_UPLOADING = 1
        const val STATUS_UPLOAD_SUCCESS = 2
        const val STATUS_UPLOAD_ERROR = 3
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as UploadPhotoBean

        if (index != other.index) return false
        if (title != other.title) return false
        if (localPath != other.localPath) return false
        if (photoUrl != other.photoUrl) return false
        if (status != other.status) return false
        if (uploadPercent != other.uploadPercent) return false

        return true
    }

    override fun hashCode(): Int {
        var result = index
        result = 31 * result + title.hashCode()
        result = 31 * result + localPath.hashCode()
        result = 31 * result + photoUrl.hashCode()
        result = 31 * result + status
        result = 31 * result + uploadPercent.hashCode()
        return result
    }


}